import { createSSRApp } from 'vue';
import App from './App.vue';
import { setupStore } from '@/store';
import 'uno.css';
import uviewPlus from 'uview-plus';
import Navigation from '@/components/navigation/index.vue';
import Tabbar from '@/components/tabbar/index.vue';
import ToTop from '@/components/to-top/index.vue';
import moment from 'moment';

export function createApp() {
    const app = createSSRApp(App);

    app.use(uviewPlus);
    app.config.globalProperties.$moment = moment;
    app.component('Navigation', Navigation);
    app.component('Tabbar', Tabbar);
    app.component('ToTop', ToTop);

    // Configure store
    setupStore(app);
    return {
        app,
    };
}
